package com.lhz.project.system.mapper.dept;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhz.common.page.BaseQueryParam;
import com.lhz.project.system.model.entity.dept.Dept;
import com.lhz.project.system.model.vo.dept.DeptTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LiHuaZhi
 * @since 2020-06-14 14:24:22
 */
@Mapper
public interface DeptMapper extends BaseMapper<Dept> {

    /**
     * 根据ID查询
     *
     * @param id
     * @return
     */
    Dept selectByPrimaryKey(Integer id);

    /**
     * 查询列表
     *
     * @param param
     * @return
     */
    List<Dept> listDept(BaseQueryParam param);

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    int deletePhyByPrimaryKey(Integer id);

    /**
     * 批量逻辑删除
     *
     * @param list
     * @return
     */
    int deletePhyByPrimaryKeys(@Param("list") List<Integer> list);

    /**
     * 树形列表查询
     *
     * @param param
     * @return
     */
    List<DeptTreeVo> listTreeDept(BaseQueryParam param);
}